﻿namespace ED.Cousul
{
    public class AppCousulConfig
    {
        /// <summary>
        /// 服务注册地址
        /// </summary>
        public string ServiceUrl { get; set; }

        /// <summary>
        /// 注册服务编号
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 注册服务名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 注册服务地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 注册服务端口
        /// </summary>
        public int Port { get; set; }

        /// <summary>
        /// 注册服务启动多久开始注册该服务
        /// </summary>
        public TimeSpan DeregisterCriticalServiceAfter { get; set; }

        /// <summary>
        /// 注册服务健康检查时间间隔
        /// </summary>
        public TimeSpan Interval { get; set; }

        /// <summary>
        /// 注册服务健康检查地址
        /// </summary>
        public string HealCheckUrl { get; set; }

        /// <summary>
        /// 服务注册超时
        /// </summary>
        public TimeSpan Timeout { get; set; }

        /// <summary>
        /// 服务检查类型
        /// </summary>
        public string Scheme { get; set; } = "http";

    }
}
